<template>
	<view class="flexco">
		<view class="logov flexco">
			<image src="../../static/logo.png" mode="" class="logo"></image>
			<image src="../../static/logotxt.png" mode="" class="logotxt"></image>
		</view>
		<view class="flexco">
			<template v-if="!yihuoqu">
				<!--  #ifdef  MP-WEIXIN -->
				<view class="pore" @click="otherLogin('weixin')">
					<view class="flexbe btn1 jianbian">
						<u-icon name="weixin-fill" color="#ffffff" size="40"></u-icon>
						<text class="cor-ff">微信快捷登录</text>
					</view>
					<!-- <button type="default" open-type="getUserInfo" @getuserinfo="userInfo"></button> -->
				</view>
				<!-- #endif -->
				<view class="flexbe btn1 jianbian" @click="accountLogin">
					<u-icon name="account" color="#ffffff" size="40"></u-icon>
					<text class="cor-ff">账号密码登录</text>
				</view>
				<view class="flexbe btn1 bor1" @click="smsLogin">
					<u-icon name="chat-fill" color="#cfb198" size="40"></u-icon>
					<text class="btn2txt">短信验证码登录</text>
				</view>
			</template>
			<view class="pore" v-if="yihuoqu">
				<view class="flexbe btn1 jianbian">
					<u-icon name="weixin-fill" color="#ffffff" size="40"></u-icon>
					<text class="cor-ff">获取用户手机号</text>
				</view>
				<button type="default" open-type="getPhoneNumber" @getphonenumber="miniprogramLogin"></button>
			</view>

			<!--  #ifdef  APP -->

			<u-divider bg-color="#f5f8fb" height="90" margin-bottom="30rpx">其他登录方式</u-divider>
			<view class="flexst">
				<view class="flexst" @click="otherLogin('weixin')"><u-icon name="weixin-circle-fill" color="#3ecf00" size="70"></u-icon></view>
				<view class="" @click="otherLogin('apple')"><image src="../../static/apple.png" mode="" class="apple" v-if="system >= 13 && platform == 'ios'"></image></view>
			</view>
			<!-- #endif -->
		</view>
	</view>
</template>

<script setup lang="ts">
	// 账号密码登录
	const accountLogin = () =>{
		uni.navigateTo({
			url:'/pages/account-login/account-login'
		})
	};
	
	// 短信验证码登录
	const smsLogin = () =>{
		console.log(6666)
		uni.navigateTo({
			url:'/pages/sms-login/sms-login'
		})
	}
</script>

<style lang="scss">
page {
	background: #f5f8fb;
}
.logov {
	padding: 180rpx 0;
}
.logo {
	width: 280rpx;
	height: 280rpx;
}
.logotxt {
	width: 240rpx;
	height: 26rpx;
}
.btn1 {
	width: 620rpx;
	height: 100rpx;
	border-radius: 50rpx;
	padding: 0 180rpx;
	box-sizing: border-box;
	margin-bottom: 40rpx;
}
.jianbian {
	background: linear-gradient(132deg, #ffeec8 0%, #dabc84 100%);
}
.bor1 {
	border: 1rpx solid #cfb198;
}
.btn2txt {
	color: #cfb198;
}
button {
	position: absolute;
	left: 0;
	top: 0;
	width: 620rpx;
	height: 100rpx;
	opacity: 0;
}
.apple {
	width: 65rpx;
	height: 65rpx;
	margin-left: 40rpx;
	border-radius: 65rpx;
}
</style>
